import { useRoutes } from 'react-router-dom'
import Home from '@/views/home'
import Interface from '@/views/interface'
import SourceCode from '@/views/sourceCode'

const routes = [
	{
		path: '/home',
		name: '首页',
		element: <Home />,
		exact: true,
	},
  {
		path: '/interface',
		name: '页面',
		element: <Interface />,
		exact: true,
	},
  {
		path: '/sourceCode',
		name: '手写源码',
		element: <SourceCode />,
		exact: true,
	},
	{
		path: '*',
		element: <Home />,
	},
]

const ConfigRoutes = () => {
	return useRoutes(routes)
}

export default ConfigRoutes
